import control    #pip install control
import matplotlib.pyplot as plt
import math
import numpy as np

sys = control.tf([1],[1,0.4,0]) #系统
mag, phase, omega = control.freqresp(sys, [0.1*np.pi,0.4*np.pi,0.8*np.pi,1*np.pi,2*np.pi]) #频率响应
print(omega)
print(mag)
print(phase*180/np.pi)